<template>
	<view>
		<uni-icons type="left" size="30" @click="back"></uni-icons>
		<iceCollapse :dataList="dataList" />
		<iceMessage :msgParams="msgParams.value" @iceClose="msgParams.isOpen=false" />
	</view>
</template>
<script setup>
	import {
		reactive,
		ref
	} from 'vue'
	import {
		postHistoryExam
	} from '../../src/api';
	import iceCollapse from '@/components/onceMore/iceCollapse.vue'
	import {
		iceGetStorage
	} from '../../utils/common';
	const msgParams = reactive({
		value: {
			msgType: '',
			messageText: '',
			isOpen: false
		}
	})
	const back = () => {
		uni.navigateBack()
	}
	const dataList = ref([])
	const HistoryExam = async () => {
		const uid = await iceGetStorage('userId')
		postHistoryExam({
			uid
		}).then(res => {
			if (res.code == 0) {
				dataList.value = res.data
			} else {
				msgParams.value = {
					msgType: 'e',
					messageText: res.msg,
					isOpen: true
				}
			}
		})
	}
	HistoryExam()
</script>
<style scoped>

</style>